import { getRequest, postRequest, putRequest, deleteRequest } from '@/utils/request';
/**
 * 物料
 * */
// 创建
export const spinProductCreate = (data) => postRequest('/spin/product/create', data);

// 更新
export const spinProductUpdate = (data) => putRequest('/spin/product/update', data);

// 删除
export const spinProductDelete = (params) => deleteRequest('/spin/product/delete', params);

// 获得
export const spinProductGet = (params) => getRequest('/spin/product/get', params);

// 获得分页
export const spinProductPage = (params) => getRequest('/spin/product/page', params);

// 导出 Excel
export const spinProductExportExcel = (params) => getRequest('/spin/product/export-excel', params);

// 提交
export const spinProductSubmitAudit = (params) => postRequest('/spin/product/submit-audit', params);
// 撤销提交
export const spinProductClearSubmitAudit = (params) => postRequest('/spin/product/clear-submit-audit', params);
// 审核
export const spinProductAudit = (params) => postRequest('/spin/product/audit', params);
// 撤销审核
export const spinProductClearAudit = (params) => postRequest('/spin/product/clear-audit', params);
// 保存并审核
export const spinProductCreateAudit = (params) => postRequest('/spin/product/create-audit', params);
// 更新并审核
export const spinProductUpdateAudit = (params) => putRequest('/spin/product/update-audit', params);
// 关闭
export const spinProductClose = (params) => postRequest('/spin/product/close', params);
// 撤销关闭
export const spinProductClearClose = (params) => postRequest('/spin/product/clear-close', params);

// 批量创建和验证
export const spinProductCreates = (params) => postRequest('/spin/product/batch-create', params);
export const spinProductBatchValid = (params) => postRequest('/spin/product/batch-valid', params);
